package syuhei.mdatools.database;

import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class User {
	
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long key;

    @Persistent
    private String name;

    @Persistent
    private int uid;

    @Persistent
    private Date date;

    @Persistent
    private Projects project[];

    public User(String name, int uid){
    	this.name = name;
    	this.uid = uid;
    	this.date = new Date();
    }

	public void setProject(Projects project[]) {
		this.project = project;
	}

	public Projects[] getProject() {
		return project;
	}
}
